/**
 * Created by IntelliJ IDEA.
 * User: user
 * Date: 20.12.12
 * Time: 11:18
 * To change this template use File | Settings | File Templates.
 */
package zakladki.kontynenty {
public class AbstractCountryColorMap {

    private var nativeNameCountryColorMap:Object;
    private var nameCountryColorMap:Object;


    public function AbstractCountryColorMap(nativeNameCountryColorMap:Object, nameCountryColorMap:Object) {
        this.nativeNameCountryColorMap = nativeNameCountryColorMap;
        this.nameCountryColorMap = nameCountryColorMap;
    }

    public function getColorByName(name:String):String {
        if(nativeNameCountryColorMap.hasOwnProperty(name)){
           return nativeNameCountryColorMap[name];
        }
        if(nameCountryColorMap.hasOwnProperty(name)){
            return nameCountryColorMap[name];
        }
        return null;
    }
}
}
